
<div class="block_pinterest">
    <div class="container_wrapper">
        {% if section.settings.title != '' or section.settings.detail != '' %}
        <div class="block_title">
            {% if section.settings.title != '' %}<h2>{{ section.settings.title }}</h2>{% endif %}
            {% if section.settings.detail != '' %}<div class="block_detail">{{ section.settings.detail }}</div>{% endif %}
        </div>
        {% endif %}
        <div class="block_pinterest_content" {% if section.settings.height == "" %}style="min-height: 500px;"{% endif %}>
            <a data-pin-do="embedUser" data-pin-board-width="1200" data-pin-scale-height="500" data-pin-scale-width="80" href="https://www.pinterest.com/{{ section.settings.account }}"></a>
        </div>
    </div>
</div>
<script async defer src="//assets.pinterest.com/js/pinit.js"></script>

{% schema %}
{
    "name":  {
    "zh_CN": "Pinterest"
    },
    "max_blocks":0,
    "tag": "section",
    "class": "block_pinterest",
    "is_global": false,
    "settings": [
        {
            "type": "card_header",
            "label": {
                "zh_CN": "设置"
            }
        },
        {
            "type": "card_input",
            "id": "title",
            "label": {
                "zh_CN": "标题"
            },
            "placeholder": {
                "zh-CN": "请输入标题"
            }
        },
        {
            "type": "card_text_editor",
            "id": "detail",
            "label": {
                "zh_CN": "简短描述"
            },
            "placeholder": {
                "zh-CN": "请输入描述"
            }
        },
        {
            "type": "card_input",
            "id": "account",
            "label": {
                "zh_CN": "账号"
            },
            "placeholder": {
                "zh_CN": "请输入账号,如XXXXX"
            },
            "info": {
                "zh_CN": "Pinterest账号，例如:https://www.pinterest.com/XXXXX"
            }
        },
        {
            "type": "card_input",
            "id": "height",
            "label": {
                "zh_CN": "高度"
            }
        }

    ],
    "blocks": [],
    "default": {
        "settings": {
            "title": "Pinterest",
            "detail": "Display the latest updated list from Pinterest account.",
            "account": "",
            "height": "500"               
        },
        "blocks": []
    }
}
{% endschema %}